home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIMultiplexInputStream.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  172 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIMultiplexInputStream.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIMultiplexInputStream_h__
  6. #define __gen_nsIMultiplexInputStream_h__
  7.  
  8.  
  9. #ifndef __gen_nsIInputStream_h__
  10. #include "nsIInputStream.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIMultiplexInputStream */
  19. #define NS_IMULTIPLEXINPUTSTREAM_IID_STR "a076fd12-1dd1-11b2-b19a-d53b5dffaade"
  20.  
  21. #define NS_IMULTIPLEXINPUTSTREAM_IID \
  22.   {0xa076fd12, 0x1dd1, 0x11b2, \
  23.     { 0xb1, 0x9a, 0xd5, 0x3b, 0x5d, 0xff, 0xaa, 0xde }}
  24.  
  25. /**
  26.  * The multiplex stream concatinates a list of input streams into a single
  27.  * stream.
  28.  */
  29. class NS_NO_VTABLE nsIMultiplexInputStream : public nsIInputStream {
  30.  public: 
  31.  
  32.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMULTIPLEXINPUTSTREAM_IID)
  33.  
  34.   /**
  35.      * Number of streams in this multiplex-stream
  36.      */
  37.   /* readonly attribute unsigned long count; */
  38.   NS_IMETHOD GetCount(PRUint32 *aCount) = 0;
  39.  
  40.   /**
  41.      * Appends a stream to the end of the streams. The cursor of the stream
  42.      * should be located at the beginning of the stream if the implementation
  43.      * of this nsIMultiplexInputStream also is used as an nsISeekableStream.
  44.      * @param stream  stream to append
  45.      */
  46.   /* void appendStream (in nsIInputStream stream); */
  47.   NS_IMETHOD AppendStream(nsIInputStream *stream) = 0;
  48.  
  49.   /**
  50.      * Insert a stream at specified index.  If the cursor of this stream is at
  51.      * the beginning of the stream at index, the cursor will be placed at the
  52.      * beginning of the inserted stream instead.
  53.      * The cursor of the new stream should be located at the beginning of the
  54.      * stream if the implementation of this nsIMultiplexInputStream also is
  55.      * used as an nsISeekableStream.
  56.      * @param stream  stream to insert
  57.      * @param index   index to insert stream at, must be <= count
  58.      */
  59.   /* void insertStream (in nsIInputStream stream, in unsigned long index); */
  60.   NS_IMETHOD InsertStream(nsIInputStream *stream, PRUint32 index) = 0;
  61.  
  62.   /**
  63.      * Remove stream at specified index. If this stream is the one currently
  64.      * being read the readcursor is moved to the beginning of the next
  65.      * stream
  66.      * @param index   remove stream at this index, must be < count
  67.      */
  68.   /* void removeStream (in unsigned long index); */
  69.   NS_IMETHOD RemoveStream(PRUint32 index) = 0;
  70.  
  71.   /**
  72.      * Get stream at specified index.
  73.      * @param index   return stream at this index, must be < count
  74.      * @return        stream at specified index
  75.      */
  76.   /* nsIInputStream getStream (in unsigned long index); */
  77.   NS_IMETHOD GetStream(PRUint32 index, nsIInputStream **_retval) = 0;
  78.  
  79. };
  80.  
  81. /* Use this macro when declaring classes that implement this interface. */
  82. #define NS_DECL_NSIMULTIPLEXINPUTSTREAM \
  83.   NS_IMETHOD GetCount(PRUint32 *aCount); \
  84.   NS_IMETHOD AppendStream(nsIInputStream *stream); \
  85.   NS_IMETHOD InsertStream(nsIInputStream *stream, PRUint32 index); \
  86.   NS_IMETHOD RemoveStream(PRUint32 index); \
  87.   NS_IMETHOD GetStream(PRUint32 index, nsIInputStream **_retval); 
  88.  
  89. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  90. #define NS_FORWARD_NSIMULTIPLEXINPUTSTREAM(_to) \
  91.   NS_IMETHOD GetCount(PRUint32 *aCount) { return _to GetCount(aCount); } \
  92.   NS_IMETHOD AppendStream(nsIInputStream *stream) { return _to AppendStream(stream); } \
  93.   NS_IMETHOD InsertStream(nsIInputStream *stream, PRUint32 index) { return _to InsertStream(stream, index); } \
  94.   NS_IMETHOD RemoveStream(PRUint32 index) { return _to RemoveStream(index); } \
  95.   NS_IMETHOD GetStream(PRUint32 index, nsIInputStream **_retval) { return _to GetStream(index, _retval); } 
  96.  
  97. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  98. #define NS_FORWARD_SAFE_NSIMULTIPLEXINPUTSTREAM(_to) \
  99.   NS_IMETHOD GetCount(PRUint32 *aCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCount(aCount); } \
  100.   NS_IMETHOD AppendStream(nsIInputStream *stream) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendStream(stream); } \
  101.   NS_IMETHOD InsertStream(nsIInputStream *stream, PRUint32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertStream(stream, index); } \
  102.   NS_IMETHOD RemoveStream(PRUint32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveStream(index); } \
  103.   NS_IMETHOD GetStream(PRUint32 index, nsIInputStream **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStream(index, _retval); } 
  104.  
  105. #if 0
  106. /* Use the code below as a template for the implementation class for this interface. */
  107.  
  108. /* Header file */
  109. class nsMultiplexInputStream : public nsIMultiplexInputStream
  110. {
  111. public:
  112.   NS_DECL_ISUPPORTS
  113.   NS_DECL_NSIMULTIPLEXINPUTSTREAM
  114.  
  115.   nsMultiplexInputStream();
  116.  
  117. private:
  118.   ~nsMultiplexInputStream();
  119.  
  120. protected:
  121.   /* additional members */
  122. };
  123.  
  124. /* Implementation file */
  125. NS_IMPL_ISUPPORTS1(nsMultiplexInputStream, nsIMultiplexInputStream)
  126.  
  127. nsMultiplexInputStream::nsMultiplexInputStream()
  128. {
  129.   /* member initializers and constructor code */
  130. }
  131.  
  132. nsMultiplexInputStream::~nsMultiplexInputStream()
  133. {
  134.   /* destructor code */
  135. }
  136.  
  137. /* readonly attribute unsigned long count; */
  138. NS_IMETHODIMP nsMultiplexInputStream::GetCount(PRUint32 *aCount)
  139. {
  140.     return NS_ERROR_NOT_IMPLEMENTED;
  141. }
  142.  
  143. /* void appendStream (in nsIInputStream stream); */
  144. NS_IMETHODIMP nsMultiplexInputStream::AppendStream(nsIInputStream *stream)
  145. {
  146.     return NS_ERROR_NOT_IMPLEMENTED;
  147. }
  148.  
  149. /* void insertStream (in nsIInputStream stream, in unsigned long index); */
  150. NS_IMETHODIMP nsMultiplexInputStream::InsertStream(nsIInputStream *stream, PRUint32 index)
  151. {
  152.     return NS_ERROR_NOT_IMPLEMENTED;
  153. }
  154.  
  155. /* void removeStream (in unsigned long index); */
  156. NS_IMETHODIMP nsMultiplexInputStream::RemoveStream(PRUint32 index)
  157. {
  158.     return NS_ERROR_NOT_IMPLEMENTED;
  159. }
  160.  
  161. /* nsIInputStream getStream (in unsigned long index); */
  162. NS_IMETHODIMP nsMultiplexInputStream::GetStream(PRUint32 index, nsIInputStream **_retval)
  163. {
  164.     return NS_ERROR_NOT_IMPLEMENTED;
  165. }
  166.  
  167. /* End of implementation class template. */
  168. #endif
  169.  
  170.  
  171. #endif /* __gen_nsIMultiplexInputStream_h__ */
  172.